<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * 模特类, 继承于 User 模块
 */

class Model_model extends User_model
{
    var $user_type = 1;
    var $area_type = array(
        0 => '中国',
        1 => '欧美',
        2 => '日韩',
        4 => '电商',
        3 => '混血',
        5 => '少儿',
        6 => '新面孔',
    );

    protected $label_en = array('1'=>'famous_china');//标签英文
    protected $label_zh = array('famous_china'=>'中国名模');//标签中文

    var $area_label = array('0'=>array(1));

    /**
     * 通过用户区域类型取得用户标签, 或全取
     * @param $area_type
     * @param $zh
    */
    public function get_label($area_type='', $zh=false){
        $label = array();
        if (''!==$area_type){
            $tmp_label = $this->area_label[$area_type];
            foreach ($tmp_label as $v) {
                $label[$v] = $this->label_en[$v];
            }
        } else {
            $label = $this->label_en;
        }

        if ($zh) {
            $tmp_label = $label;
            foreach ($tmp_label as $k=>$v) {
                $label[$k] = $this->label_zh[$v];
            }
        }
        return $label;
    }

}